//
//  RentCarViewController.m
//  Car
//
//  Created by dllo on 15/11/10.
//  Copyright © 2015年 岳明. All rights reserved.
//

#import "RentCarViewController.h"
#import "TieDeatailCell0.h"
#import "MJRefresh.h"
#import "TieDeatailViewController.h"

#define WIDTH [UIScreen mainScreen].bounds.size.width
#define HEIGHT [UIScreen mainScreen].bounds.size.height

@interface RentCarViewController ()<UIWebViewDelegate>
@property (nonatomic, strong) UIWebView *web;
@property (nonatomic, retain) UIActivityIndicatorView *activ;

@end

@implementation RentCarViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.web = [[UIWebView alloc]initWithFrame:self.view.bounds];
    [self.view addSubview:self.web];
    self.web.backgroundColor = [UIColor whiteColor];
    
    self.web.delegate = self;
    self.activ = [[UIActivityIndicatorView alloc]initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
    self.activ.center = self.view.center;
    [self.view addSubview:self.activ];
    [self.activ startAnimating];

    NSURL *url = [NSURL URLWithString:@"http://m.baojia.com/?utm_source=aikaqiche"];
    NSURLRequest *request = [NSURLRequest requestWithURL:url];
    [self.web loadRequest:request];
    
    //返回
    [self skipReturnWithTarget:self];
    
    //bar颜色
    [self navigationbarColor];
}

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    self.navigationController.navigationBarHidden = NO;
}

-(void)webViewDidFinishLoad:(UIWebView *)webView
{
    [self.activ stopAnimating];
}

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        self.hidesBottomBarWhenPushed = YES;
    }
    return self;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
